* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "my-self-fnot", sans-serif;
}

// 定义变量
$custom-border-radius: 8px;
$font-family: 'Arial', sans-serif;
$bubble-radius: 15px;
$box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
$transition: transform 0.3s ease, opacity 0.3s ease;
$font-size: 14px;
$line-height: 1.5;
$time-font-size: 12px;
$time-margin-top: 4px;
$avatar-margin: 8px;
$image-width: 35px;
$image-height: 20px;
$file-width: 250px;
$file-height: 40px;
$text-info-width: 250px;
$text-info-min-width: 100px;
$text-info-min-height: 40px;
$text-info-line-height: 40px;
$no-messages-width: 300px;
$no-messages-height: 100px;

.dispose-message-factory {
    height: 80vh;
    border-radius: $custom-border-radius;
    font-family: $font-family;

    .chat-content {
        display: flex;
        flex-direction: column;
        height: 100vh;

        .time-group {
            font-size: $time-font-size;
            color: black;
            margin-top: $time-margin-top;
            text-align: center;
        }

        .msg {
            display: flex;
            align-items: flex-start;
            width: 100%;
            margin-bottom: 12px;

            .n-avatar {
                flex-shrink: 0;
            }

            &.self {
                justify-content: flex-end;

                .n-avatar {
                    margin-left: $avatar-margin;
                }

                .bubble {
                    background-color: #a8dadc;
                    color: black;
                    margin-left: auto;
                }
            }

            &.other {
                justify-content: flex-start;

                .n-avatar {
                    margin-right: $avatar-margin;
                }

                .bubble {
                    background-color: #b8f3cf;
                    color: #333;
                    margin-right: auto;
                }
            }

            .bubble {
                display: flex;
                max-width: 70%;
                padding: 10px 15px;
                border-radius: $bubble-radius;
                margin: 5px 0;
                position: relative;
                font-size: $font-size;
                line-height: $line-height;
                box-shadow: $box-shadow;
                transition: $transition;
            }
        }

        .friend-chat-list {
            height: 80%;
            overflow-y: auto;
            padding: 10px;
        }

        .group-chat-content {
            height: 80%;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            padding: 8px 12px;

            .msg {
                &.self {
                    flex-direction: row-reverse;

                    .bubble {
                        margin-right: $avatar-margin;
                        border-radius: 12px 0 12px 12px;
                        background: #91edb5;
                        color: #000;
                    }
                }

                &.other {
                    flex-direction: row;

                    .bubble {
                        margin-left: $avatar-margin;
                        border-radius: 0 12px 12px 12px;
                        background: #fff;
                        color: #000;
                        border: 1px solid #e5e5e5;
                    }
                }

                .avatar {
                    flex-shrink: 0;
                }

                .bubble {
                    max-width: 70%;
                    padding: 8px 12px;
                    word-break: break-word;
                    display: flex;
                    flex-direction: column;
                }
            }
        }

        .bubble-image {
            display: flex;
            align-items: flex-end;
            width: $image-width;
            height: $image-height;
            object-fit: cover;

            &.self {
                order: 1;
                transform: rotateY(180deg);
            }

            &.other {
                order: -1;
            }
        }

        .text-container {
            width: auto;
            display: flex;
            align-items: center;
            flex-grow: 1;

            .text {
                font-size: 18px;
                line-height: 28px;
            }
        }


        .group-invation-message {
            color: #2195e8;
            // color: red;
            margin-top: 5px;
            text-align: center;
        }
    }
}

// 这里是处理文件信息的css样式，单独分出来设置
// .image-file,
// .file-image-info {
//     display: flex;
//     align-items: center;
//     justify-content: space-evenly;
//     width: 50px;
//     // height: 40px;
//     box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
//     // object-fit: cover;
// }

.text-file,
.application-file,
.unknown-file {
    font-size: $font-size;
    display: flex;
    flex-direction: row;
    width: $file-width;
    border-radius: $custom-border-radius;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);

    p {
        text-align: center;
        width: 190px;
        height: 30px;
        text-overflow: ellipsis;
        text-wrap: nowrap;
        overflow: hidden;
        line-height: 30px;
    }

    .icon {
        display: flex;
        align-items: center;

        img {
            height: 50px;
        }
    }
}

.text-info {
    word-break: break-all;
    width: auto;
    min-width: $text-info-min-width;
    min-height: $text-info-min-height;
    line-height: $text-info-line-height;
    font-size: 15px;
    text-align: center;
    max-width: $text-info-width;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: $custom-border-radius;
    background-color: white;
}

.no-messages {
    position: absolute;
    border-radius: 8px;
    height: $no-messages-height;
    width: $no-messages-width;
    transform: translate(100%, 200%);
    text-align: center;
    line-height: $no-messages-height;
}


.n-popover {
    .group-members-info {
        #members-dispose-btns {
            margin-top: 10px;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-evenly;

            div {
                display: flex;
                flex-direction: column;
                align-items: center;
                width: 70px;
                transition: transform 0.3s ease-in-out;

                &:hover {
                    transform: scale(0.95);
                }

                img {
                    width: 50px;
                    object-fit: cover;
                }
            }
        }
    }
}